'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.home);

  //home
  router.get('/get_house', controller.home.index.get_house); //获取房源信息
  router.get('/high_score', controller.home.index.high_score); //高分房源
  router.get('/wonderfulPlace', controller.home.index.wonderfulPlace);
  router.get('/goodHouse', controller.home.index.goodHouse);
  router.get('/hieghtHouse', controller.home.index.hieghtHouse);
  router.get('/hotHouse', controller.home.index.hotHouse);


  //detail_more
  router.get('/more', controller.detailMore.index.more);
  router.get('/getareadata', controller.detailMore.index.getareadata)
  //detail
  router.get('/detail', controller.detail.index.detail);
  router.get('/getImg', controller.detail.index.getImg);
  router.get('/getLandlord', controller.detail.index.getLandlord);
  router.get('/getLocation', controller.detail.index.getLocation);

  //login&register

  router.post('/login', controller.loginRegister.index.login)
  router.post('/register', controller.loginRegister.index.register)
  router.get('/verify', controller.loginRegister.index.verify); //验证码
  //wishlists
  router.post('/wishlists', controller.wishlists.wish.wish)

};
